/*
 * @Author: wurangkun wurangkun@qq.com
 * @Date: 2023-05-26 11:15:08
 * @LastEditors: wurangkun wurangkun@qq.com
 * @LastEditTime: 2023-05-26 11:22:01
 * @FilePath: \myblog_server\src\utils\mkDir.ts
 * @Description: 创建文件夹
 */
import { UPLOADURL } from "src/config"

const fs = require('fs')
const path = require('path')

/**
 * 创建上传文件夹
 */
const mkUploads = ()=>{
  const uploadDir = path.join(__dirname, `../${UPLOADURL}`)
  if (!fs.existsSync(uploadDir)) {
    fs.mkdirSync(uploadDir);
  }
}

mkUploads()